# $Revision: 1.0 $
# $Date: 2007/10/09 18:22:36 $
# Bao Nguyen <bn@ucsd.edu>
#
# DESCRIPTION: database

package gpdb;
use strict;
use warnings;
use DBI;

BEGIN {
   use Exporter ();
   our ( @ISA, @EXPORT_OK );
   @ISA		= qw(Exporter);
   @EXPORT_OK	= qw( $DBH $GRIDPROBE_TABLE &db_connect );
}

our @EXPORT_OK;
our $DBH;
our $GRIDPROBE_TABLE = "GridProbeResults";

# database string
my $dsn = "DBI:mysql:database=gridprobe;host=noc-nettools.nbirn.net;";
my $user= 'gridstat';
my $pw	= 'iamagridbot';


sub db_connect{
   $DBH = DBI->connect( $dsn, $user, $pw) or die "Unable to connect to DB:" . $DBH->errstr . "\n";
}

